﻿using System;

class GreaterVariable
{
    static void Main()
    {
        // Exercise 1.
        //Write an if statement that examines two integer variables and exchanges their values if the first one is greater 
        //than the second one.

        Console.Write("Enter the first variable:  ");
        int firstVariable = int.Parse(Console.ReadLine());
        Console.Write("Enter the second variable:  ");
        int secondVariable = int.Parse(Console.ReadLine());
        int thirdVariable;

        if (secondVariable > firstVariable)
        {
            Console.WriteLine("{0} is greater that {1}.", secondVariable, firstVariable);
        }
        else
        {
            thirdVariable = secondVariable;
            secondVariable = firstVariable;
            firstVariable = thirdVariable;
            Console.WriteLine();
            Console.WriteLine("After the exchange, the first variable is {0}, and the second variable is {1}.", 
                firstVariable, secondVariable);
            Console.WriteLine();
        }

    }
}

